package com.ctz.commonframe.ui.view.csp;

import android.content.Context;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.View;
import android.widget.LinearLayout;

public abstract class CardView<T> extends LinearLayout{
	protected View itemView;
	
	public CardView(Context context) {
		this(context, null);
	}
	
	public CardView(Context context, AttributeSet attrs) {
		this(context, attrs, 0);
	}
	
	public CardView(Context context, AttributeSet attrs, int defStyleAttr) {
		super(context, attrs, defStyleAttr);
		setGravity(Gravity.CENTER_HORIZONTAL);
		itemView = inflate(context, getLayout(), this);
	}
	
	public abstract void fillData(T data);
	
	public abstract int getLayout();
	
}
